<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!-- 加载编辑器的容器 -->
<form action="" id="form1">
    <input type="submit">
<div><script id="container" name="content" type="text/plain">
        这里写你的初始化内容
    </script></div>
<!-- 配置文件 -->
<script type="text/javascript" src="utf8-php/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="utf8-php/ueditor.all.js"></script>
<!-- 实例化编辑器 -->
<script type="text/javascript">
    var ue = UE.getEditor('container',{
        toolbars: [
            ['fullscreen', 'source', 'undo','|', 'redo'],
            ['bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc']
        ]
    });

    var form1 = document.getElementById('form1');
    form1.onsubmit = function(){
        if (ue.getContent() == ''){
            alert('请输入内容');
            return false;
        }
    }
</script>
</form>
</body>
</html>